home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-05-21 | 33.5 KB | 1,244 lines |
- #!/bin/sh
- # Guess values for system-dependent variables and create Makefiles.
- # Generated automatically using autoconf.
- # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
-
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 2, or (at your option)
- # any later version.
-
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
-
- # You should have received a copy of the GNU General Public License
- # along with this program; if not, write to the Free Software
- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
- # [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET]
- # Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and
- # --with-PACKAGE unless this script has special code to handle it.
-
-
- for arg
- do
- # Handle --exec-prefix with a space before the argument.
- if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
- # Handle --host with a space before the argument.
- elif test x$next_host = xyes; then next_host=
- # Handle --prefix with a space before the argument.
- elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
- # Handle --srcdir with a space before the argument.
- elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
- else
- case $arg in
- # For backward compatibility, also recognize exact --exec_prefix.
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
- exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
- next_exec_prefix=yes ;;
-
- -gas | --gas | --ga | --g) ;;
-
- -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
- -host | --host | --hos | --ho | --h)
- next_host=yes ;;
-
- -nfp | --nfp | --nf) ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
- no_create=1 ;;
-
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- next_prefix=yes ;;
-
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
- srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
- next_srcdir=yes ;;
-
- -with-* | --with-*)
- package=`echo $arg|sed 's/-*with-//'`
- # Delete all the valid chars; see if any are left.
- if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
- echo "configure: $package: invalid package name" >&2; exit 1
- fi
- eval "with_`echo $package|sed s/-/_/g`=1" ;;
-
- *) ;;
- esac
- fi
- done
-
- trap 'rm -f conftest* core; exit 1' 1 3 15
-
- rm -f conftest*
- compile='${CC-cc} $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
-
- # A filename unique to this package, relative to the directory that
- # configure is in, which we can look for to find out if srcdir is correct.
- unique_file=Makefile.in
-
- # Find the source files, if location was not specified.
- if test -z "$srcdir"; then
- srcdirdefaulted=yes
- # Try the directory containing this script, then `..'.
- prog=$0
- confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
- test "X$confdir" = "X$prog" && confdir=.
- srcdir=$confdir
- if test ! -r $srcdir/$unique_file; then
- srcdir=..
- fi
- fi
- if test ! -r $srcdir/$unique_file; then
- if test x$srcdirdefaulted = xyes; then
- echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
- else
- echo "configure: Can not find sources in \`${srcdir}'." 1>&2
- fi
- exit 1
- fi
- # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
- # But we can't avoid them for `..', to make subdirectories work.
- case $srcdir in
- .|/*|~*) ;;
- *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
- esac
-
-
- echo checking for ln -s
- rm -f conftestdata
- if ln -s X conftestdata 2>/dev/null
- then
- rm -f conftestdata
- LN_S="ln -s"
- else
- LN_S=ln
- fi
-
-
- if test -z "$CC"; then
- echo checking for gcc
- saveifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/gcc; then
- CC="gcc"
- break
- fi
- done
- IFS="$saveifs"
- fi
- test -z "$CC" && CC="cc"
-
- # Find out if we are using GNU C, under whatever name.
- cat > conftest.c <<EOF
- #ifdef __GNUC__
- yes
- #endif
- EOF
- ${CC-cc} -E conftest.c > conftest.out 2>&1
- if egrep yes conftest.out >/dev/null 2>&1; then
- GCC=1 # For later tests.
- fi
- rm -f conftest*
-
- echo checking for POSIXized ISC
- if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
- then
- ISC=1 # If later tests want to check for ISC.
- DEFS="$DEFS -D_POSIX_SOURCE=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}_POSIX_SOURCE\${SEDdB}_POSIX_SOURCE\${SEDdC}1\${SEDdD}
- \${SEDuA}_POSIX_SOURCE\${SEDuB}_POSIX_SOURCE\${SEDuC}1\${SEDuD}
- \${SEDeA}_POSIX_SOURCE\${SEDeB}_POSIX_SOURCE\${SEDeC}1\${SEDeD}
- "
- if test -n "$GCC"; then
- CC="$CC -posix"
- else
- CC="$CC -Xp"
- fi
- fi
-
- echo checking for DYNIX/ptx
- echo checking how to run the C preprocessor
- if test -z "$CPP"; then
- CPP='${CC-cc} -E'
- cat > conftest.c <<EOF
- #include <stdio.h>
- EOF
- err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
- if test -z "$err"; then
- :
- else
- CPP=/lib/cpp
- fi
- rm -f conftest*
- fi
-
- cat > conftest.c <<EOF
- #if defined(_SEQUENT_)
- yes
- #endif
-
- EOF
- eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
- if grep "yes" conftest.out >/dev/null 2>&1; then
- SEQUENT=1
- fi
- rm -f conftest*
-
- if test -n "$SEQUENT"; then
- EX_LIBS="-lsocket -linet -lnsl -lseq"
- PARALLEL_MAKE='\&'
- CC='cc'
- GCC=
- echo You"'"re on Sequent.. Using cc and parallel make
- fi
- echo checking for SunOS 5.1
- cat > conftest.c <<EOF
- #if defined(SVR4) && defined(SPARC)
- yes
- #endif
-
- EOF
- eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
- if grep "yes" conftest.out >/dev/null 2>&1; then
- SUNOS51=1
- fi
- rm -f conftest*
-
- if test -n "$SUNOS51"; then
- EX_LIBS="-lsockect -lnsl"
- fi
-
-
- echo checking for AIX
- cat > conftest.c <<EOF
- #ifdef _AIX
- yes
- #endif
-
- EOF
- eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
- if egrep "yes" conftest.out >/dev/null 2>&1; then
- DEFS="$DEFS -D_ALL_SOURCE=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}_ALL_SOURCE\${SEDdB}_ALL_SOURCE\${SEDdC}1\${SEDdD}
- \${SEDuA}_ALL_SOURCE\${SEDuB}_ALL_SOURCE\${SEDuC}1\${SEDuD}
- \${SEDeA}_ALL_SOURCE\${SEDeB}_ALL_SOURCE\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
-
-
- echo checking for DGUX
- cat > conftest.c <<EOF
- #if defined(DGUX)
- yes
- #endif
- EOF
- eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
- if grep "yes" conftest.out >/dev/null 2>&1; then
- DGUX=1
- fi
- rm -f conftest*
-
- # Make sure to not get the incompatible SysV /etc/install and
- # /usr/sbin/install, which might be in PATH before a BSD-like install,
- # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
- # or the AFS install, which mishandles nonexistent args. (Sigh.)
- if test -z "$INSTALL"; then
- echo checking for install
- saveifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- case $dir in
- /etc|/usr/sbin|/usr/etc|/usr/afsws/bin) ;;
- *)
- if test -f $dir/install; then
- if grep dspmsg $dir/install >/dev/null 2>&1; then
- : # AIX
- else
- INSTALL="$dir/install -c"
- INSTALL_PROGRAM='$(INSTALL)'
- INSTALL_DATA='$(INSTALL) -m 644'
- break
- fi
- fi
- ;;
- esac
- done
- IFS="$saveifs"
- fi
- INSTALL=${INSTALL-cp}
- INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
- INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
-
- if test -z "$RANLIB"; then
- echo checking for ranlib
- saveifs="$IFS"; IFS="${IFS}:"
- for dir in $PATH; do
- test -z "$dir" && dir=.
- if test -f $dir/ranlib; then
- RANLIB="ranlib"
- break
- fi
- done
- IFS="$saveifs"
- fi
- test -z "$RANLIB" && RANLIB="@:"
-
- echo checking for directory library header
- echo checking for dirent.h
- cat > conftest.c <<EOF
- #include <dirent.h>
- EOF
- err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
- if test -z "$err"; then
- DEFS="$DEFS -DDIRENT=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}DIRENT\${SEDdB}DIRENT\${SEDdC}1\${SEDdD}
- \${SEDuA}DIRENT\${SEDuB}DIRENT\${SEDuC}1\${SEDuD}
- \${SEDeA}DIRENT\${SEDeB}DIRENT\${SEDeC}1\${SEDeD}
- " dirheader=dirent.h
- fi
- rm -f conftest*
-
- if test -z "$dirheader"; then
- echo checking for sys/ndir.h
- cat > conftest.c <<EOF
- #include <sys/ndir.h>
- EOF
- err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
- if test -z "$err"; then
- DEFS="$DEFS -DSYSNDIR=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}SYSNDIR\${SEDdB}SYSNDIR\${SEDdC}1\${SEDdD}
- \${SEDuA}SYSNDIR\${SEDuB}SYSNDIR\${SEDuC}1\${SEDuD}
- \${SEDeA}SYSNDIR\${SEDeB}SYSNDIR\${SEDeC}1\${SEDeD}
- " dirheader=sys/ndir.h
- fi
- rm -f conftest*
-
- fi
- if test -z "$dirheader"; then
- echo checking for sys/dir.h
- cat > conftest.c <<EOF
- #include <sys/dir.h>
- EOF
- err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
- if test -z "$err"; then
- DEFS="$DEFS -DSYSDIR=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}SYSDIR\${SEDdB}SYSDIR\${SEDdC}1\${SEDdD}
- \${SEDuA}SYSDIR\${SEDuB}SYSDIR\${SEDuC}1\${SEDuD}
- \${SEDeA}SYSDIR\${SEDeB}SYSDIR\${SEDeC}1\${SEDeD}
- " dirheader=sys/dir.h
- fi
- rm -f conftest*
-
- fi
- if test -z "$dirheader"; then
- echo checking for ndir.h
- cat > conftest.c <<EOF
- #include <ndir.h>
- EOF
- err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
- if test -z "$err"; then
- DEFS="$DEFS -DNDIR=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}NDIR\${SEDdB}NDIR\${SEDdC}1\${SEDdD}
- \${SEDuA}NDIR\${SEDuB}NDIR\${SEDuC}1\${SEDuD}
- \${SEDeA}NDIR\${SEDeB}NDIR\${SEDeC}1\${SEDeD}
- " dirheader=ndir.h
- fi
- rm -f conftest*
-
- fi
-
- echo checking for closedir return value
- cat > conftest.c <<EOF
- #include <sys/types.h>
- #include <$dirheader>
- int closedir(); main() { exit(0); }
- EOF
- eval $compile
- if test -s conftest && (./conftest; exit) 2>/dev/null; then
- :
- else
- DEFS="$DEFS -DVOID_CLOSEDIR=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}VOID_CLOSEDIR\${SEDdB}VOID_CLOSEDIR\${SEDdC}1\${SEDdD}
- \${SEDuA}VOID_CLOSEDIR\${SEDuB}VOID_CLOSEDIR\${SEDuC}1\${SEDuD}
- \${SEDeA}VOID_CLOSEDIR\${SEDeB}VOID_CLOSEDIR\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
-
- echo checking for ansi-style prototypes
- cat > conftest.c <<EOF
- main(int argc,char **argv){exit(0);}
- EOF
- eval $compile
- if test -s conftest && (./conftest; exit) 2>/dev/null; then
- DEFS="$DEFS -DHAVE_ANSI_PROTO=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_ANSI_PROTO\${SEDdB}HAVE_ANSI_PROTO\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_ANSI_PROTO\${SEDuB}HAVE_ANSI_PROTO\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_ANSI_PROTO\${SEDeB}HAVE_ANSI_PROTO\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- if test -n "$GCC"; then
- DEFS="$DEFS -DHAVE_ANSI_PROTO=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_ANSI_PROTO\${SEDdB}HAVE_ANSI_PROTO\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_ANSI_PROTO\${SEDuB}HAVE_ANSI_PROTO\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_ANSI_PROTO\${SEDeB}HAVE_ANSI_PROTO\${SEDeC}1\${SEDeD}
- "
- fi
- echo checking for ANSI C header files
- cat > conftest.c <<EOF
- #include <stdlib.h>
- #include <stdarg.h>
- #include <string.h>
- #include <float.h>
- EOF
- err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
- if test -z "$err"; then
- # SunOS string.h does not declare mem*, contrary to ANSI.
- echo '#include <string.h>' > conftest.c
- eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
- if egrep "memchr" conftest.out >/dev/null 2>&1; then
- # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- cat > conftest.c <<EOF
- #include <ctype.h>
- #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
- int main () { int i; for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
- exit (0); }
-
- EOF
- eval $compile
- if test -s conftest && (./conftest; exit) 2>/dev/null; then
- DEFS="$DEFS -DSTDC_HEADERS=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}STDC_HEADERS\${SEDdB}STDC_HEADERS\${SEDdC}1\${SEDdD}
- \${SEDuA}STDC_HEADERS\${SEDuB}STDC_HEADERS\${SEDuC}1\${SEDuD}
- \${SEDeA}STDC_HEADERS\${SEDeB}STDC_HEADERS\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- fi
- rm -f conftest*
-
- fi
- rm -f conftest*
-
- for hdr in string.h memory.h strings.h
- do
- trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
- echo checking for ${hdr}
- cat > conftest.c <<EOF
- #include <${hdr}>
- EOF
- err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
- if test -z "$err"; then
- DEFS="$DEFS -D${trhdr}=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}${trhdr}\${SEDdB}${trhdr}\${SEDdC}1\${SEDdD}
- \${SEDuA}${trhdr}\${SEDuB}${trhdr}\${SEDuC}1\${SEDuD}
- \${SEDeA}${trhdr}\${SEDeB}${trhdr}\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- done
-
- echo checking for long file names
- (echo 1 > conftest9012345) 2>/dev/null
- (echo 2 > conftest9012346) 2>/dev/null
- val=`cat conftest9012345 2>/dev/null`
- test -f conftest9012345 && test "$val" = 1 && DEFS="$DEFS -DHAVE_LONG_FILE_NAMES=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_LONG_FILE_NAMES\${SEDdB}HAVE_LONG_FILE_NAMES\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_LONG_FILE_NAMES\${SEDuB}HAVE_LONG_FILE_NAMES\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_LONG_FILE_NAMES\${SEDeB}HAVE_LONG_FILE_NAMES\${SEDeC}1\${SEDeD}
- "
- rm -f conftest9012345 conftest9012346
-
- echo checking for word sizes
- cat > conftest.c <<EOF
- main(){ exit(sizeof(unsigned)!=2); }
- EOF
- eval $compile
- if test -s conftest && (./conftest; exit) 2>/dev/null; then
- DEFS="$DEFS -DSIZE_INT_2=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}SIZE_INT_2\${SEDdB}SIZE_INT_2\${SEDdC}1\${SEDdD}
- \${SEDuA}SIZE_INT_2\${SEDuB}SIZE_INT_2\${SEDuC}1\${SEDuD}
- \${SEDeA}SIZE_INT_2\${SEDeB}SIZE_INT_2\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- cat > conftest.c <<EOF
- main(){ exit(sizeof(unsigned)!=4); }
- EOF
- eval $compile
- if test -s conftest && (./conftest; exit) 2>/dev/null; then
- DEFS="$DEFS -DSIZE_INT_4=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}SIZE_INT_4\${SEDdB}SIZE_INT_4\${SEDdC}1\${SEDdD}
- \${SEDuA}SIZE_INT_4\${SEDuB}SIZE_INT_4\${SEDuC}1\${SEDuD}
- \${SEDeA}SIZE_INT_4\${SEDeB}SIZE_INT_4\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- cat > conftest.c <<EOF
- main(){ exit(sizeof(short)!=2); }
- EOF
- eval $compile
- if test -s conftest && (./conftest; exit) 2>/dev/null; then
- DEFS="$DEFS -DSIZE_SRT_2=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}SIZE_SRT_2\${SEDdB}SIZE_SRT_2\${SEDdC}1\${SEDdD}
- \${SEDuA}SIZE_SRT_2\${SEDuB}SIZE_SRT_2\${SEDuC}1\${SEDuD}
- \${SEDeA}SIZE_SRT_2\${SEDeB}SIZE_SRT_2\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- cat > conftest.c <<EOF
- main(){ exit(sizeof(long)!=4); }
- EOF
- eval $compile
- if test -s conftest && (./conftest; exit) 2>/dev/null; then
- DEFS="$DEFS -DSIZE_LNG_4=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}SIZE_LNG_4\${SEDdB}SIZE_LNG_4\${SEDdC}1\${SEDdD}
- \${SEDuA}SIZE_LNG_4\${SEDuB}SIZE_LNG_4\${SEDuC}1\${SEDuD}
- \${SEDeA}SIZE_LNG_4\${SEDeB}SIZE_LNG_4\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- echo checking for unistd.h
- cat > conftest.c <<EOF
- #include <unistd.h>
- EOF
- err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
- if test -z "$err"; then
- DEFS="$DEFS -DHAVE_UNISTD_H=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_UNISTD_H\${SEDdB}HAVE_UNISTD_H\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_UNISTD_H\${SEDuB}HAVE_UNISTD_H\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_UNISTD_H\${SEDeB}HAVE_UNISTD_H\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
-
- echo checking for mode_t in sys/types.h
- echo '#include <sys/types.h>' > conftest.c
- eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
- if grep "mode_t" conftest.out >/dev/null 2>&1; then
- :
- else
- DEFS="$DEFS -Dmode_t=int"
- SEDDEFS="${SEDDEFS}\${SEDdA}mode_t\${SEDdB}mode_t\${SEDdC}int\${SEDdD}
- \${SEDuA}mode_t\${SEDuB}mode_t\${SEDuC}int\${SEDuD}
- \${SEDeA}mode_t\${SEDeB}mode_t\${SEDeC}int\${SEDeD}
- "
- fi
- rm -f conftest*
-
- echo checking for pid_t in sys/types.h
- echo '#include <sys/types.h>' > conftest.c
- eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
- if grep "pid_t" conftest.out >/dev/null 2>&1; then
- :
- else
- DEFS="$DEFS -Dpid_t=int"
- SEDDEFS="${SEDDEFS}\${SEDdA}pid_t\${SEDdB}pid_t\${SEDdC}int\${SEDdD}
- \${SEDuA}pid_t\${SEDuB}pid_t\${SEDuC}int\${SEDuD}
- \${SEDeA}pid_t\${SEDeB}pid_t\${SEDeC}int\${SEDeD}
- "
- fi
- rm -f conftest*
-
- echo checking for size_t in sys/types.h
- echo '#include <sys/types.h>' > conftest.c
- eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
- if grep "size_t" conftest.out >/dev/null 2>&1; then
- :
- else
- DEFS="$DEFS -Dsize_t=unsigned"
- SEDDEFS="${SEDDEFS}\${SEDdA}size_t\${SEDdB}size_t\${SEDdC}unsigned\${SEDdD}
- \${SEDuA}size_t\${SEDuB}size_t\${SEDuC}unsigned\${SEDuD}
- \${SEDeA}size_t\${SEDeB}size_t\${SEDeC}unsigned\${SEDeD}
- "
- fi
- rm -f conftest*
-
- echo checking for uid_t in sys/types.h
- echo '#include <sys/types.h>' > conftest.c
- eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
- if grep "uid_t" conftest.out >/dev/null 2>&1; then
- :
- else
- DEFS="$DEFS -Duid_t=int"
- SEDDEFS="${SEDDEFS}\${SEDdA}uid_t\${SEDdB}uid_t\${SEDdC}int\${SEDdD}
- \${SEDuA}uid_t\${SEDuB}uid_t\${SEDuC}int\${SEDuD}
- \${SEDeA}uid_t\${SEDeB}uid_t\${SEDeC}int\${SEDeD}
- " DEFS="$DEFS -Dgid_t=int"
- SEDDEFS="${SEDDEFS}\${SEDdA}gid_t\${SEDdB}gid_t\${SEDdC}int\${SEDdD}
- \${SEDuA}gid_t\${SEDuB}gid_t\${SEDuC}int\${SEDuD}
- \${SEDeA}gid_t\${SEDeB}gid_t\${SEDeC}int\${SEDeD}
- "
- fi
- rm -f conftest*
-
- echo checking for nlink_t in sys/types.h
- echo '#include <sys/types.h>' > conftest.c
- eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
- if grep "nlink_t" conftest.out >/dev/null 2>&1; then
- :
- else
- DEFS="$DEFS -Dnlink_t=int"
- SEDDEFS="${SEDDEFS}\${SEDdA}nlink_t\${SEDdB}nlink_t\${SEDdC}int\${SEDdD}
- \${SEDuA}nlink_t\${SEDuB}nlink_t\${SEDuC}int\${SEDuD}
- \${SEDeA}nlink_t\${SEDeB}nlink_t\${SEDeC}int\${SEDeD}
- "
- fi
- rm -f conftest*
-
- echo checking for bsearch
- cat > conftest.c <<EOF
- #include <stdio.h>
- main() { exit(0); }
- t() {
- #ifdef __stub_bsearch
- choke me
- #else
- /* Override any gcc2 internal prototype to avoid an error. */
- extern char bsearch (); bsearch ();
- #endif
- }
- EOF
- if eval $compile; then
- :
- else
- DEFS="$DEFS -Dbsearch=ansi_bsearch"
- SEDDEFS="${SEDDEFS}\${SEDdA}bsearch\${SEDdB}bsearch\${SEDdC}ansi_bsearch\${SEDdD}
- \${SEDuA}bsearch\${SEDuB}bsearch\${SEDuC}ansi_bsearch\${SEDuD}
- \${SEDeA}bsearch\${SEDeB}bsearch\${SEDeC}ansi_bsearch\${SEDeD}
- "
- fi
- rm -f conftest*
- #endif
-
- echo checking for random
- cat > conftest.c <<EOF
- #include <stdio.h>
- main() { exit(0); }
- t() {
- #ifdef __stub_random
- choke me
- #else
- /* Override any gcc2 internal prototype to avoid an error. */
- extern char random (); random ();
- #endif
- }
- EOF
- if eval $compile; then
- :
- else
- DEFS="$DEFS -DNEED_RANDOM=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}NEED_RANDOM\${SEDdB}NEED_RANDOM\${SEDdC}1\${SEDdD}
- \${SEDuA}NEED_RANDOM\${SEDuB}NEED_RANDOM\${SEDuC}1\${SEDuD}
- \${SEDeA}NEED_RANDOM\${SEDeB}NEED_RANDOM\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- #endif
-
- echo checking for strdup
- cat > conftest.c <<EOF
- #include <stdio.h>
- main() { exit(0); }
- t() {
- #ifdef __stub_strdup
- choke me
- #else
- /* Override any gcc2 internal prototype to avoid an error. */
- extern char strdup(); strdup();
- #endif
- }
- EOF
- if eval $compile; then
- :
- else
- DEFS="$DEFS -DNEED_STRDUP=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}NEED_STRDUP\${SEDdB}NEED_STRDUP\${SEDdC}1\${SEDdD}
- \${SEDuA}NEED_STRDUP\${SEDuB}NEED_STRDUP\${SEDuC}1\${SEDuD}
- \${SEDeA}NEED_STRDUP\${SEDeB}NEED_STRDUP\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- #endif
-
- echo checking for bcopy
- cat > conftest.c <<EOF
- #include <stdio.h>
- main() { exit(0); }
- t() {
- #ifdef __stub_bcopy
- choke me
- #else
- /* Override any gcc2 internal prototype to avoid an error. */
- extern char bcopy(); bcopy();
- #endif
- }
- EOF
- if eval $compile; then
- :
- else
- DEFS="$DEFS -DNEED_BCOPY=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}NEED_BCOPY\${SEDdB}NEED_BCOPY\${SEDdC}1\${SEDdD}
- \${SEDuA}NEED_BCOPY\${SEDuB}NEED_BCOPY\${SEDuC}1\${SEDuD}
- \${SEDeA}NEED_BCOPY\${SEDeB}NEED_BCOPY\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- #endif
-
- echo checking for flock
- cat > conftest.c <<EOF
- #include <stdio.h>
- main() { exit(0); }
- t() {
- #ifdef __stub_flock
- choke me
- #else
- /* Override any gcc2 internal prototype to avoid an error. */
- extern char flock(); flock();
- #endif
- }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DHAVE_FLOCK=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_FLOCK\${SEDdB}HAVE_FLOCK\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_FLOCK\${SEDuB}HAVE_FLOCK\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_FLOCK\${SEDeB}HAVE_FLOCK\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- #endif
-
- echo checking for lockf
- cat > conftest.c <<EOF
- #include <stdio.h>
- main() { exit(0); }
- t() {
- #ifdef __stub_lockf
- choke me
- #else
- /* Override any gcc2 internal prototype to avoid an error. */
- extern char lockf(); lockf();
- #endif
- }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DHAVE_LOCKF=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_LOCKF\${SEDdB}HAVE_LOCKF\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_LOCKF\${SEDuB}HAVE_LOCKF\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_LOCKF\${SEDeB}HAVE_LOCKF\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- #endif
-
- echo checking for shmget
- LOCKPATH="conftestlock"
- cat > conftest.c <<EOF
-
- #include <sys/types.h>
- #include <fcntl.h>
- #include <sys/ipc.h>
- #include <sys/shm.h>
- #define LOCKPATH "$LOCKPATH"
-
- main() {
- key_t ky;
- int sh, rv, fd;
-
- fd = open(LOCKPATH, O_RDWR | O_CREAT, 0666);
- if (fd == -1) exit(1);
- rv = 0;
- ky = ftok(LOCKPATH, 2001);
- if (ky == (key_t) -1) rv = 1;
- else {
- struct shmid_ds foo;
- sh = shmget(ky, 1, IPC_CREAT | 0666);
- if (sh == -1) rv = 1;
- else shmctl(sh, IPC_RMID, &foo);
- }
- close(fd);
- exit(rv); }
- EOF
- eval $compile
- if test -s conftest && (./conftest; exit) 2>/dev/null; then
- DEFS="$DEFS -DHAVE_SHMEM=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_SHMEM\${SEDdB}HAVE_SHMEM\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_SHMEM\${SEDuB}HAVE_SHMEM\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_SHMEM\${SEDeB}HAVE_SHMEM\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- rm -f $LOCKPATH conftest.c
- echo checking for d_ino
- cat > conftest.c <<EOF
- #ifdef DIRENT
- #include <dirent.h>
- #else
- #ifdef SYSDIR
- #include <sys/dir.h>
- #else
- #ifdef SYSNDIR
- #include <sys/ndir.h>
- #endif
- #endif
- #endif
- main() { exit(0); }
- t() {
- #ifdef DIRENT
- struct dirent *dp;
- #else
- struct direct *dp;
- #endif
- int a ; a=dp->d_ino; }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DHAVE_D_INO=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_D_INO\${SEDdB}HAVE_D_INO\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_D_INO\${SEDuB}HAVE_D_INO\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_D_INO\${SEDeB}HAVE_D_INO\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
-
- echo checking for d_fileno
- cat > conftest.c <<EOF
- #ifdef DIRENT
- #include <dirent.h>
- #else
- #ifdef SYSDIR
- #include <sys/dir.h>
- #else
- #ifdef SYSNDIR
- #include <sys/ndir.h>
- #endif
- #endif
- #endif
- main() { exit(0); }
- t() {
- #ifdef DIRENT
- struct dirent *dp;
- #else
- struct direct *dp;
- #endif
- int a ; a=dp->d_fileno; }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DHAVE_D_FILENO=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_D_FILENO\${SEDdB}HAVE_D_FILENO\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_D_FILENO\${SEDuB}HAVE_D_FILENO\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_D_FILENO\${SEDeB}HAVE_D_FILENO\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
-
- if test -z "$DGUX"; then
- echo checking for union wait
- cat > conftest.c <<EOF
- #include <sys/types.h>
- #include <sys/wait.h>
-
- main() { exit(0); }
- t() { union wait u ; }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DHAVE_UNION_WAIT=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_UNION_WAIT\${SEDdB}HAVE_UNION_WAIT\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_UNION_WAIT\${SEDuB}HAVE_UNION_WAIT\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_UNION_WAIT\${SEDeB}HAVE_UNION_WAIT\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
-
- fi
- echo checking for WEXITSTATUS
- cat > conftest.c <<EOF
- #ifdef HAVE_UNISTD_H
- #ifndef __hpux
- #include <unistd.h>
- #endif
- #endif
- #include <sys/types.h>
- #include <sys/wait.h>
- main() { exit(0); }
- t() {
- #if defined(HAVE_UNION_WAIT) && !defined(__hpux)
- union wait foo;
- #else
- int foo;
- #endif
- WEXITSTATUS(foo); }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DHAVE_WEXITSTATUS=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_WEXITSTATUS\${SEDdB}HAVE_WEXITSTATUS\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_WEXITSTATUS\${SEDuB}HAVE_WEXITSTATUS\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_WEXITSTATUS\${SEDeB}HAVE_WEXITSTATUS\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
-
- echo checking for S_ISREG
- cat > conftest.c <<EOF
- #include <sys/types.h>
- #include <sys/stat.h>
- main() { exit(0); }
- t() { struct stat sb; return S_ISREG(sb.st_mode); }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DHAVE_S_ISREG=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_S_ISREG\${SEDdB}HAVE_S_ISREG\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_S_ISREG\${SEDuB}HAVE_S_ISREG\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_S_ISREG\${SEDeB}HAVE_S_ISREG\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
-
- echo checking for S_ISDIR
- cat > conftest.c <<EOF
- #include <sys/types.h>
- #include <sys/stat.h>
- main() { exit(0); }
- t() { struct stat sb; return S_ISDIR(sb.st_mode); }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DHAVE_S_ISDIR=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_S_ISDIR\${SEDdB}HAVE_S_ISDIR\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_S_ISDIR\${SEDuB}HAVE_S_ISDIR\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_S_ISDIR\${SEDeB}HAVE_S_ISDIR\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
-
- echo checking for tzfile.h
- cat > conftest.c <<EOF
- #include <tzfile.h>
- EOF
- err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
- if test -z "$err"; then
- TZFILE_H=1
- DEFS="$DEFS -DHAVE_TZFILE_H=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_TZFILE_H\${SEDdB}HAVE_TZFILE_H\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_TZFILE_H\${SEDuB}HAVE_TZFILE_H\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_TZFILE_H\${SEDeB}HAVE_TZFILE_H\${SEDeC}1\${SEDeD}
- "
- else
- DEFS="$DEFS -D'USE_SECSPERDAY=(long)60*60*24'"
- SEDDEFS="${SEDDEFS}\${SEDdA}USE_SECSPERDAY\${SEDdB}USE_SECSPERDAY\${SEDdC}(long)60*60*24\${SEDdD}
- \${SEDuA}USE_SECSPERDAY\${SEDuB}USE_SECSPERDAY\${SEDuC}(long)60*60*24\${SEDuD}
- \${SEDeA}USE_SECSPERDAY\${SEDeB}USE_SECSPERDAY\${SEDeC}(long)60*60*24\${SEDeD}
- "
- DEFS="$DEFS -DUSE_DAYSPERNYEAR=365"
- SEDDEFS="${SEDDEFS}\${SEDdA}USE_DAYSPERNYEAR\${SEDdB}USE_DAYSPERNYEAR\${SEDdC}365\${SEDdD}
- \${SEDuA}USE_DAYSPERNYEAR\${SEDuB}USE_DAYSPERNYEAR\${SEDuC}365\${SEDuD}
- \${SEDeA}USE_DAYSPERNYEAR\${SEDeB}USE_DAYSPERNYEAR\${SEDeC}365\${SEDeD}
- "
- fi
- rm -f conftest*
-
- if test -n "$TZFILE_H"; then
- echo checking for SECSPERDAY
- cat > conftest.c <<EOF
- #include <tzfile.h>
- main() { exit(0); }
- t() { long b = SECSPERDAY; }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DHAVE_SECSPERDAY=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_SECSPERDAY\${SEDdB}HAVE_SECSPERDAY\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_SECSPERDAY\${SEDuB}HAVE_SECSPERDAY\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_SECSPERDAY\${SEDeB}HAVE_SECSPERDAY\${SEDeC}1\${SEDeD}
- "
- else
- echo checking for SECS_PER_DAY
- cat > conftest.c <<EOF
- #include <tzfile.h>
- main() { exit(0); }
- t() { long b = SECS_PER_DAY; }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DUSE_SECSPERDAY=SECS_PER_DAY"
- SEDDEFS="${SEDDEFS}\${SEDdA}USE_SECSPERDAY\${SEDdB}USE_SECSPERDAY\${SEDdC}SECS_PER_DAY\${SEDdD}
- \${SEDuA}USE_SECSPERDAY\${SEDuB}USE_SECSPERDAY\${SEDuC}SECS_PER_DAY\${SEDuD}
- \${SEDeA}USE_SECSPERDAY\${SEDeB}USE_SECSPERDAY\${SEDeC}SECS_PER_DAY\${SEDeD}
- "
- else
- DEFS="$DEFS -D'USE_SECSPERDAY=(long)60*60*24'"
- SEDDEFS="${SEDDEFS}\${SEDdA}USE_SECSPERDAY\${SEDdB}USE_SECSPERDAY\${SEDdC}(long)60*60*24\${SEDdD}
- \${SEDuA}USE_SECSPERDAY\${SEDuB}USE_SECSPERDAY\${SEDuC}(long)60*60*24\${SEDuD}
- \${SEDeA}USE_SECSPERDAY\${SEDeB}USE_SECSPERDAY\${SEDeC}(long)60*60*24\${SEDeD}
- "
- fi
- rm -f conftest*
-
- fi
- rm -f conftest*
-
- echo checking for DAYSPERNYEAR
- cat > conftest.c <<EOF
- #include <tzfile.h>
- main() { exit(0); }
- t() { int b = DAYSPERNYEAR; }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DHAVE_DAYSPERNYEAR=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_DAYSPERNYEAR\${SEDdB}HAVE_DAYSPERNYEAR\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_DAYSPERNYEAR\${SEDuB}HAVE_DAYSPERNYEAR\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_DAYSPERNYEAR\${SEDeB}HAVE_DAYSPERNYEAR\${SEDeC}1\${SEDeD}
- "
- else
- echo checking for DAYS_PER_NYEAR
- cat > conftest.c <<EOF
- #include <tzfile.h>
- main() { exit(0); }
- t() { int b = DAYS_PER_NYEAR; }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DUSE_DAYSPERNYEAR=DAYS_PER_NYEAR"
- SEDDEFS="${SEDDEFS}\${SEDdA}USE_DAYSPERNYEAR\${SEDdB}USE_DAYSPERNYEAR\${SEDdC}DAYS_PER_NYEAR\${SEDdD}
- \${SEDuA}USE_DAYSPERNYEAR\${SEDuB}USE_DAYSPERNYEAR\${SEDuC}DAYS_PER_NYEAR\${SEDuD}
- \${SEDeA}USE_DAYSPERNYEAR\${SEDeB}USE_DAYSPERNYEAR\${SEDeC}DAYS_PER_NYEAR\${SEDeD}
- "
- else
- DEFS="$DEFS -DUSE_DAYSPERNYEAR=365"
- SEDDEFS="${SEDDEFS}\${SEDdA}USE_DAYSPERNYEAR\${SEDdB}USE_DAYSPERNYEAR\${SEDdC}365\${SEDdD}
- \${SEDuA}USE_DAYSPERNYEAR\${SEDuB}USE_DAYSPERNYEAR\${SEDuC}365\${SEDuD}
- \${SEDeA}USE_DAYSPERNYEAR\${SEDeB}USE_DAYSPERNYEAR\${SEDeC}365\${SEDeD}
- "
- fi
- rm -f conftest*
-
- fi
- rm -f conftest*
-
- fi
- echo checking for string.h declaring some functions incorrectly
- echo "$DEFS
- #include <sys/types.h>
- #include <string.h>
- " > conftest.c
- $CC conftest.c -o conftest $LIBS > conftest.out 2>&1
- if grep "conflicting types for built-in function" conftest.out >/dev/null; then DEFS="$DEFS -DSTRING_H_BOGUS=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}STRING_H_BOGUS\${SEDdB}STRING_H_BOGUS\${SEDdC}1\${SEDdD}
- \${SEDuA}STRING_H_BOGUS\${SEDuB}STRING_H_BOGUS\${SEDuC}1\${SEDuD}
- \${SEDeA}STRING_H_BOGUS\${SEDeB}STRING_H_BOGUS\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
- echo checking for vprintf
- cat > conftest.c <<EOF
-
- main() { exit(0); }
- t() { vprintf(); }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DHAVE_VPRINTF=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_VPRINTF\${SEDdB}HAVE_VPRINTF\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_VPRINTF\${SEDuB}HAVE_VPRINTF\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_VPRINTF\${SEDeB}HAVE_VPRINTF\${SEDeC}1\${SEDeD}
- "
- else
- vprintf_missing=1
- fi
- rm -f conftest*
-
- if test -n "$vprintf_missing"; then
- echo checking for _doprnt
- cat > conftest.c <<EOF
-
- main() { exit(0); }
- t() { _doprnt(); }
- EOF
- if eval $compile; then
- DEFS="$DEFS -DHAVE_DOPRNT=1"
- SEDDEFS="${SEDDEFS}\${SEDdA}HAVE_DOPRNT\${SEDdB}HAVE_DOPRNT\${SEDdC}1\${SEDdD}
- \${SEDuA}HAVE_DOPRNT\${SEDuB}HAVE_DOPRNT\${SEDuC}1\${SEDuD}
- \${SEDeA}HAVE_DOPRNT\${SEDeB}HAVE_DOPRNT\${SEDeC}1\${SEDeD}
- "
- fi
- rm -f conftest*
-
- fi
-
- if test -z "$GCC"; then
- prog='/* Ultrix mips cc rejects this. */
- typedef int charset[2]; const charset x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *p;
- char **p2;
- /* HPUX 7.0 cc rejects these. */
- ++p;
- p2 = (char const* const*) p;'
- echo checking for working const
- cat > conftest.c <<EOF
-
- main() { exit(0); }
- t() { $prog }
- EOF
- if eval $compile; then
- :
- else
- DEFS="$DEFS -Dconst="
- SEDDEFS="${SEDDEFS}\${SEDdA}const\${SEDdB}const\${SEDdC}\${SEDdD}
- \${SEDuA}const\${SEDuB}const\${SEDuC}\${SEDuD}
- \${SEDeA}const\${SEDeB}const\${SEDeC}\${SEDeD}
- "
- fi
- rm -f conftest*
-
- fi
- if test -n "$prefix"; then
- test -z "$exec_prefix" && exec_prefix='${prefix}'
- prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
- fi
- if test -n "$exec_prefix"; then
- prsub="$prsub
- s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%\
- exec_prefix\\1=\\2$exec_prefix%"
- fi
-
- trap 'rm -f config.status; exit 1' 1 3 15
- echo creating config.status
- rm -f config.status
- cat > config.status <<EOF
- #!/bin/sh
- # Generated automatically by configure.
- # Run this file to recreate the current configuration.
- # This directory was configured as follows,
- # on host `(hostname || uname -n) 2>/dev/null`:
- #
- # $0 $*
-
- for arg
- do
- case "\$arg" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- exec /bin/sh $0 $* ;;
- *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
- esac
- done
-
- trap 'rm -f Makefile include/tweak.h conftest*; exit 1' 1 3 15
- LN_S='$LN_S'
- CC='$CC'
- CPP='$CPP'
- EX_LIBS='$EX_LIBS'
- PARALLEL_MAKE='$PARALLEL_MAKE'
- INSTALL='$INSTALL'
- INSTALL_PROGRAM='$INSTALL_PROGRAM'
- INSTALL_DATA='$INSTALL_DATA'
- RANLIB='$RANLIB'
- LIBS='$LIBS'
- srcdir='$srcdir'
- prefix='$prefix'
- exec_prefix='$exec_prefix'
- prsub='$prsub'
- EOF
- cat >> config.status <<\EOF
-
- top_srcdir=$srcdir
- for file in .. Makefile; do if [ "x$file" != "x.." ]; then
- srcdir=$top_srcdir
- # Remove last slash and all that follows it. Not all systems have dirname.
- dir=`echo $file|sed 's%/[^/][^/]*$%%'`
- if test "$dir" != "$file"; then
- test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
- test ! -d $dir && mkdir $dir
- fi
- echo creating $file
- rm -f $file
- echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
- sed -e "
- $prsub
- s%@LN_S@%$LN_S%g
- s%@CC@%$CC%g
- s%@CPP@%$CPP%g
- s%@EX_LIBS@%$EX_LIBS%g
- s%@PARALLEL_MAKE@%$PARALLEL_MAKE%g
- s%@INSTALL@%$INSTALL%g
- s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
- s%@INSTALL_DATA@%$INSTALL_DATA%g
- s%@RANLIB@%$RANLIB%g
- s%@LIBS@%$LIBS%g
- s%@srcdir@%$srcdir%g
- s%@DEFS@%-DHAVE_CONFIG_H%" $top_srcdir/${file}.in >> $file
- fi; done
-
- echo creating include/tweak.h
- # These sed commands are put into SEDDEFS when defining a macro.
- # They are broken into pieces to make the sed script easier to manage.
- # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
- # is the cpp macro being defined and VALUE is the value it is being given.
- # Each defining turns into a single global substitution command.
- #
- # SEDd sets the value in "#define NAME VALUE" lines.
- SEDdA='s@^\([ ]*\)#\([ ]*define[ ][ ]*\)'
- SEDdB='\([ ][ ]*\)[^ ]*@\1#\2'
- SEDdC='\3'
- SEDdD='@g'
- # SEDu turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
- SEDuA='s@^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
- SEDuB='\([ ]\)@\1#\2define\3'
- SEDuC=' '
- SEDuD='\4@g'
- # SEDe turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
- SEDeA='s@^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
- SEDeB='$@\1#\2define\3'
- SEDeC=' '
- SEDeD='@g'
- rm -f conftest.sed
- cat > conftest.sed <<CONFEOF
- EOF
- # Turn off quoting long enough to insert the sed commands.
- cat >> config.status <<EOF
- $SEDDEFS
- EOF
- cat >> config.status <<\EOF
- CONFEOF
- rm -f conftest.h
- # Break up the sed commands because old seds have small limits.
- cp $top_srcdir/include/tweak.h.in conftest.h1
- while :
- do
- lines=`grep -c . conftest.sed`
- if test -z "$lines" || test "$lines" -eq 0; then break; fi
- rm -f conftest.s1 conftest.s2 conftest.h2
- sed 20q conftest.sed > conftest.s1 # Like head -20.
- sed 1,20d conftest.sed > conftest.s2 # Like tail +21.
- sed -f conftest.s1 < conftest.h1 > conftest.h2
- rm -f conftest.s1 conftest.h1 conftest.sed
- mv conftest.h2 conftest.h1
- mv conftest.s2 conftest.sed
- done
- rm -f conftest.sed conftest.h
- echo "/* include/tweak.h. Generated automatically by configure. */" > conftest.h
- cat conftest.h1 >> conftest.h
- rm -f conftest.h1
- if cmp -s include/tweak.h conftest.h 2>/dev/null; then
- # The file exists and we would not be changing it.
- rm -f conftest.h
- else
- rm -f include/tweak.h
- mv conftest.h include/tweak.h
- fi
-
- EOF
- chmod +x config.status
- test -n "$no_create" || ./config.status
-
-